<template>
  <div>
    <!-- 1. 将表单设置为一个子组件，表单内要有用户名和密码输入框
       2. 提交按钮写在父组件
       3. 点击提交按钮提交表单，将表单的内容打印到控制台，并且还原表单 -->

    <FormList ref="form"></FormList>
    <button @click="submitForm">提交</button>
  </div>
</template>

<script>
import FormList from './components/FormList.vue'
export default {
  components: {
    FormList
  },
  methods: {
    submitForm() {
      this.$refs.form.sonSubmit()
    }
  }
}
</script>

<style></style>
